/**
 * 
 */
package com.fireworks.geoevents.entities;

/**
 * @author Fireworks
 *
 */
public class Location implements Comparable<Location>{

	private String name;
	private String description;
	private double latitude;
	private double longitude;
	
	/**
	 * 
	 */
	public Location() {
		this(0,0);
	}
	
	/**
	 * 
	 * @param latitude
	 * @param longitude
	 */
	public Location(double latitude, double longitude){
		this(null,null,latitude,longitude);
	}

	/**
	 * 
	 * @param name
	 * @param description
	 * @param latitude
	 * @param longitude
	 */
	public Location(String name, String description, double latitude, double longitude) {
		this.setDescription(description);
		this.setName(name);
		this.latitude = latitude;
		this.longitude = longitude;
	}
	
	
	/**
	 * @return the latitude
	 */
	public double getLatitude() {
		return latitude;
	}
	
	/**
	 * @param latitude the latitude to set
	 */
	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}
	
	/**
	 * @return the longitude
	 */
	public double getLongitude() {
		return longitude;
	}
	
	/**
	 * @param longitude the longitude to set
	 */
	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}
	

	public double getDistanceTo(Location oLocation) {
		return 0;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}
	
	/**
	 * 
	 * @param oLocation
	 * @return
	 */
	public boolean equals(Location oLocation) {
		if (this.latitude==oLocation.latitude && this.longitude==oLocation.longitude)
			return true;
		return false;
	}

	@Override
	public int compareTo(Location another) {
		// TODO Auto-generated method stub
		return 0;
	}
	
	
}
